Skip to content

Fix the error when the Chinese is included in the hash#452

Merged
ivan-nginx merged 2 commits intotheme-next:masterfrom
mutoe-archive:master
Nov 3, 2018
Merged

Fix the error when the Chinese is included in the hash#452
ivan-nginx merged 2 commits intotheme-next:masterfrom
mutoe-archive:master

Conversation

@mutoe
Copy link
Contributor

@mutoe mutoe commented Oct 24, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs have been added / updated (for bug fixes / features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

When I used the anchor point with Chinese to navigate, I ran an error in the console:

jquery.js:1453 Uncaught Error: Syntax error, unrecognized expression: #%E7%BC%96%E5%86%99%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC
    at Function.gb.error (jquery.js:1453)
    at gb.tokenize (jquery.js:2070)
    at gb.select (jquery.js:2474)
    at Function.gb [as find] (jquery.js:850)
    at n.fn.init.find (jquery.js:2690)
    at new n.fn.init (jquery.js:2798)
    at n (jquery.js:76)
    at utils.js?v=6.4.2:62
    at dispatch (jquery.js:4430)
    at r.handle (jquery.js:4116)

Issue Number(s): N/A

What is the new behavior?

Ignore the jquery selector when it is detected that the Chinese symbol is included in the hash.

  • Screens with this changes:
    image

  • Link to demo site with this changes: N/A

Does this PR introduce a breaking change?

  • Yes.
  • No.

@sli1989 sli1989 self-requested a review October 30, 2018 09:15
@ivan-nginx ivan-nginx added this to the v6.6.0 milestone Nov 3, 2018
@ivan-nginx ivan-nginx merged commit b905385 into theme-next:master Nov 3, 2018
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Fix the error when the Chinese is included in the hash
wens07 pushed a commit to wens07/hexo-theme-next that referenced this pull request May 8, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants